1. Field of the Invention
The present invention generally relates to semiconductor devices, and more particularly, to a semiconductor device that includes a non-volatile memory. Even more specifically, the present invention relates to a technique of controlling the operation of a semiconductor device using CAM (Content Addressable Memory) data.
2. Description of the Related Art
Conventionally, two types of non-volatile memory semiconductor devices are well known: one has a structure that determines whether the data stored in a non-volatile memory is equivalent to expected value data so as to automatically perform data checking at the time of programming or erasing a non-volatile memory and the other one has a structure that has regular non-volatile memory cells to be used by users and CAM cells to control the operation of the semiconductor device. In recent years, so as to reduce the device size, a structure that has CAM cells formed with regular non-volatile memory cells has been proposed. If the CAM cells have the same structures as the regular memory cells, the word lines and the bit lines to be connected to the CAM cells should preferably have the same structure as those to be connected to the regular memory cells.
The CAM data that is written in CAM cells having the same structures as regular memory cells is preferably read out and transferred to a volatile memory unit (a latch circuit) such as a SRAM (Static Random Access Memory) at the time of power on or resetting of the hardware. By doing so, the operating speed at the time of read-access to the regular non-volatile memory cells is not reduced by CAM data reading.
If the CAM cells have the same structure as the regular memory cells, the verifying operation of the CAM cells should preferably be completed within the memory device at the time of rewriting the CAM data, like the verifying operation of the regular memory cells. Japanese Unexamined Patent Publication No. 6-76586 discloses a verification circuit for programming regular memory cells.
When regular memory cells are to be programmed, the information “1” or “0” is input through I/Os by a user. A memory cell having the information “0” input thereto is a memory cell to be programmed, and a memory cell having the information “1” input thereto is a memory cell to be erased. The information of each I/O is used as an expected value at the time of verification.
In a semiconductor device, prior to actual programming, the data is read out from the memory cell connected to the word lines to be programmed. This process is referred to as “pre-reading”. The pre-read data is compared with the data input through the I/Os. According to the comparison results, programming is performed only on the memory cells that are in the erased state (holding the information “1”) and are to be programmed through the I/Os (having the information “0” input thereto).
Programming is not performed on the already programmed memory cells (holding the information “0”), because additional programming results in stress. If the information that is input to the already programmed memory cells (holding the information “0”) through the I/Os is “1”, an error signal is returned to the controller. This is because the memory cells are non-volatile memories that physically perform writing operations, and have non-volatility. Therefore, an erasing operation is independent of a programming operation, and erasing is collectively performed on one sector. If the information that is input through the I/Os to the already erased memory cells (holding the information “1”) is “1”, no operations are performed.
Programming of CAM cells should preferably be performed in the same manner as the programming of regular memory cells. For programming CAM cells, there is a method that involves two different interfaces from the programming interface for regular memory cells. Input setting is performed in accordance with the information “1” and the information “0” input through the I/Os so as to determine CAM cells to be programmed and CAM cells not to be programmed (see Japanese Unexamined Patent Publication No. 10-106275). The programming interface for the input setting is referred to as “interface 1”. In the case of interface 1, a user inputs the information “1” and the information “0” through the respective I/Os. The information “1” indicates a memory cell to be programmed, while the information “0” indicates a memory cell for which no operation is to be performed (i.e., not to be programmed).
For programming CAM cells, there is not only the method involving interface 1, but also a method of designating only the CAM cells to be programmed through command input. The programming interface used in this method is referred to as “interface 2”. In the case of using interface 2, the addresses of CAM cells are designated, and the address-designated CAM cells are to be programmed.
Each CAM cell should preferably have a user block in which users can rewrite information and a factory block in which the vender maker writes information in advance. If the CAM data in the user block are rewritten in this structure, it is necessary to protect the memory cells in the factory block from disturb caused by cell information. “Disturb” is a phenomenon in which charge loss or charge gain occurs in memory cells due to electric influence from the word lines and bit lines to which the memory cells are connected at the time of programming the designated memory cells.
In a case where the CAM data in the user block is to be rewritten, it is necessary to protect the memory cells in the factory block from disturb caused by the cell information. However, there is not a conventional technique for satisfying this requirement, which is the first problem with the prior art.
The second problem with the prior art is that proper verification cannot be performed after programming CAM cells. The following is a description of this problem.
This second problem is caused when a verifying operation is performed simultaneously on CAM cells coupled to the same word line in an array structure which has more than one CAM cell connected to a word line.
FIG. 1A illustrates CAM cells that are connected to one word line and are in a programmed state. The CAM cells of “1” in FIG. 1A are erased cells and have not been programmed. The CAM cells of “0” are programmed cells and have already been programmed.
In FIG. 1B, I/O input by interface 1 is performed on the CAM cells on the word line shown in FIG. 1A. Here, the CAM cells with “1” are to be programmed, and the cells with “0” are not to be programmed and remain in the current state.
In the semiconductor device, the data that is pre-read from CAM cells on the same word line are compared with the data that is input through the I/Os. According to the comparison results, programming is performed only on the CAM cell that is in the erased state (with the information “1” being stored) and is to be I/O-programmed (with the information “1” being input). In this example, programming is performed on the rightmost CAM cell on the word line, as shown in FIG. 1C.
Verification is performed after the programming. The data that is read out from the CAM cells after the programming is compared with the I/O-input data as expected values (see FIG. 1D). At this point, if an I/O-input expected value indicates “non-programming” for an already programmed CAM cell, the comparison result is “fail”, and the verifying operation ends in failure.
In the case where the above described designation method involving interface 2 is employed, only the CAM cells to be programmed are designated by a command input. Therefore, the expected values corresponding to the CAM cells not programmed on the same word line cannot be produced, and a verifying operation cannot be done.